import { HashRouter, Routes, Route, Navigate } from "react-router-dom";

import Login from './page/Login'
import NavPage from './page/NavPage'

export default function App() {
  return (
    <>
    路由组件在此渲染：本身就是组件，在哪儿配置哪儿就是路由出口
    <HashRouter>
      {/* 插槽的写法 */}
      <Routes>
        <Route path='/' element={<Navigate to={'./Login'} />} />
        <Route path="/Login" element={<Login />} />
        <Route path="/nav" element={<NavPage />} />
      </Routes>
    </HashRouter>
    </>
  )
}
